(C) 1996 AROS - The Amiga Replacement OS


NAME
#include <proto/dos.h>
BPTR Lock()
SYNOPSIS
STRPTR name
LONG accessMode

LOCATION
In DOSBase at offset 14
FUNCTION
Gets a lock on a file or directory. There may be more than one shared lock on a file but only one if it is an exclusive one. Locked files or directories may not be deleted.

INPUTS
name
NUL terminated name of the file or directory.
accessMode
One of SHARED_LOCK EXCLUSIVE_LOCK
RESULT
Handle to the file or directory or 0 if the object couldn't be locked. IoErr() gives additional information in that case.

NOTES
The lock structure returned by this function is different from that of AmigaOS (in fact it is identical to a filehandle). Do not try to read any internal fields.

EXAMPLE
BUGS
SEE ALSO
INTERNALS
HISTORY
04.07.1997 srittau
Small adjustments.
27.01.1997 ldp
Polish
09.12.1996 aros
Added empty templates for all missing functions

Moved #include's into first column

24.10.1996 aros
Use the official AROS macros over the __AROS versions.
21.09.1996 digulla
Hand DOSBase to DoName()
11.09.1996 digulla
A couple of new DOS functions from M. Fleischer